//
//  obj_Tool.swift
//  swift Demo
//
//  Created by Mac2 on 2017/8/23.
//  Copyright © 2017年 圣光大人. All rights reserved.
//

import UIKit
class ZMTool : NSObject {
    
    
    
    
    static func transitionX(X : CGFloat) -> CGFloat{
        let scale = X / 375;
        return UIScreen.main.bounds.size.width * scale;
    }
    static func transitionY(Y : CGFloat) -> CGFloat{
        let scale = Y / 667;
        return UIScreen.main.bounds.size.height * scale;
    }
    static func distanceW(origin : UIView,X : CGFloat) -> CGFloat{
        return origin.frame.origin.x + origin.frame.size.width + ZMTool.transitionX(X: X);
    }
    static func distanceH(origin : UIView,Y : CGFloat) -> CGFloat{
        return origin.frame.origin.y + origin.frame.size.height + ZMTool.transitionY(Y: Y);
    }
    
    
}
